-
Notifications
You must be signed in to change notification settings - Fork 0
[RFC] Checkout uv and ruff #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
5ec3d12 to
faf27bc
Compare
Throw out pipenv, yapf and all that to be replaced by the more powerful tools uv and ruff
faf27bc to
0c739a4
Compare
The formatting will be done in another step, but I want to see if the CI runs through
|
I've had good experience with
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have nothing about new stuff, however if we want to keep the same toolchain all over the places, then it will requires some effort. I think we need for this good argument. But to me we could also use it only for new repository if it adds really a plus value.
| @@ -1,11 +1,11 @@ | |||
| from .settings_base import * # pylint: disable=wildcard-import, unused-wildcard-import | |||
| from .settings_base import * # noqa: F403 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the noqa: F403 is there no way to disable using some wording instead of ID, that something I like in pylint, it make much more clearer what is disabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it could be written in the comment afterwards.
@ltshb @msom Yes I 100% agree that it should be the same everywhere. I wanted to try it out here as here it's less disruptive. |
I was recommended by a friend to use ruff and uv as replacement for yapf and pipenv respectively. These tools seem to be the latest and greatest for python linting/formatting/environment handling.
Since I don't have enough context to work on the tickets in the backlog and PWIP is currently frozen, I finally had the opportunity to check these out.
So the case of uv is that it's a replacement for all things
pipandvirtualenvrelated. And it's blazingly fast. It seems to be thepnpmcousin for python, including shared package storage and workspace management. And most of all, it can handle the installation of the required python version (no dependency on the system's python installation) *Ruff on the other hand seems to be a good (and also very fast) tool to lint and format the code. I didn't look too much into that, it's only worth noting that when using it we'd have to either accept a slightly different code formatting or try to adjust the rules. Personally, I don't care much about the formatting if it's done automatically for me by a tool, and I tend to follow the community guidelines.
What do you think, should we start adopting to this?
I'm not entirely done here, but so far it looks good in my opinion.
* A good use case for this could also be if we want to use pypy instead of cypthon. I toyed with that idea a bit recently, with the idea to gain a bit of free performance in service-stac...